package com.qi.air.config;

import java.io.File;
import java.io.IOException;

/**
 * @author zjq
 * @version 1.0
 * @date 2021/9/20 15:42
 */
public class saveDemo {
    public static void main(String[] args) throws IOException {
        String path = "/Users/jiaqi.zhang/Desktop/upload";
        File dir = new File(path, "123.txt");
        File file = new File("/Users/jiaqi.zhang/Desktop/upload/123");
        file.mkdir();//创建文件夹
        if (dir.exists()) {
            System.out.println("文件创建失败！！！");
        } else {
            dir.createNewFile();
            System.out.println("文件创建成功！！！");
        }
    }
}
